<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>


<div class="container-fluid">
	<div class="row-fluid">
		<div class="span12">
			<div class="navbar">
				<div class="navbar-inner">
					<div class="container-fluid">
						<a data-target=".navbar-responsive-collapse"
							data-toggle="collapse" class="btn btn-navbar"><span
							class="icon-bar"></span><span class="icon-bar"></span><span
							class="icon-bar"></span></a> <a href="<c:url value="/welcome" />"
							class="brand">Testing System</a>
						<div class="nav-collapse collapse navbar-responsive-collapse">
							<ul class="nav">
								<li class="dropdown"><a data-toggle="dropdown"
									class="dropdown-toggle" href="#">Users<strong class="caret"></strong></a>
									<ul class="dropdown-menu">
										<c:choose>
											<c:when test="${role=='[ROLE_ADMIN]'}">

												<li><a href="<c:url value="/createNewUser" />">Create
														new user</a></li>
												<li><a href="<c:url value="/manageUsers" />">Manage
														existing users</a></li>

												<li><a href="<c:url value="/assignTestToUser" />">Assign
														test to the user</a></li>
											</c:when>
										</c:choose>
										<li><a href="<c:url value="/seeUserResults" />">See
												user results</a></li>

									</ul></li>
								
								<li class="dropdown"><a data-toggle="dropdown"
									class="dropdown-toggle" href="#">Tests<strong class="caret"></strong></a>
									<ul class="dropdown-menu">
										<c:choose>
											<c:when test="${role=='[ROLE_ADMIN]'}">
												<li><a href="<c:url value="/createTest" />">Create
														new test</a></li>
											</c:when>
										</c:choose>
										<li><a href="<c:url value="/exploreTests" />">Explore
												tests</a></li>
									</ul></li>
							</ul>
							<ul class="nav pull-right">
								<li><a> ${username}</a></li>
								<li><a href="<c:url value="/j_spring_security_logout" />">Logout</a>
								</li>


							</ul>
						</div>

					</div>
				</div>

			</div>
		</div>
	</div>
</div>
